<div id="maincontent">

<h1 style="margin-top: 75px;">Welcome To Ajuby Setup Wizard</h1>

 <div class="list">
    <h2>Step 1: Database configuration</h2>
    <h4>Please enter your database configurations here, if you are unsure we suggest that you use the default values</h4> 
 </div>
    <% for name in [:notice, :warning, :message] %>
    <% if flash[name] %>
      <%= "<div class='message-fatal'> #{flash[name]} </div>" %>
    <% end %>
  <% end %>


 <% for name in [:simplemsg] %>
    <% if flash[name] %>
      <%= "<div class='message-justmsg'> #{flash[name]} </div>" %>
    <% end %>
  <% end %>


 <div class="bar1">Database configuration</div>
   
    <div class="list">
    <%= start_form_tag :controller => 'checkinstall', :action => 'page3' %>
       <input type="hidden" name="dbtype" value="<%=@db_type%>">
        <fieldset><legend>Enter Database Settings</legend>
            <table>
   
                       <tr class="odd" >
                        <td>
                            <font color="red">*</font> Host Name  
                         </td>
                         <td>
                            <%= text_field_tag "hostname", "localhost", "size" => 20 %>
                         </td>
                       </tr>
                       <tr class="even" >
                        <td>
                            <font color="red">*</font> Database Name
                         </td>
                         <td>
                            <%= text_field_tag "dbname", "ajuby", "size" => 20 %>
                            [This will create a new database]
                         </td>
                       </tr>
                       <tr class="odd" >
                        <td>
                            <font color="red">*</font> Database User Name
                         </td>
                         <td>
                            <%= text_field_tag "dbusername", "root", "size" => 20 %>
                            [This user should have create database privileges]
                         </td>
                       </tr>
                       <tr class="even" >
                        <td>
                            <font color="red">*</font> Database Password
                         </td>
                         <td>
                            <%= password_field_tag "dbpassword", "", "size" => 20 %>
                         </td>
                       </tr>

            </table>
            <span style="font-size: 9px; color:red;">* Required fields </span> <br><br>
            <span style="font-size: 10px; color:gray;">Make sure above database does not exists. If it exists drop the database before running this setup wizard. Setup will fail if the database already exists.</span>
        </fieldset>
   </div>
 
    <tr>
        <td>
           <input type="button" value="<<Back" onclick="javascript:history.go(-1);"/>&nbsp;&nbsp;
           <%= submit_tag (value = "Next>>") %>
        </td>
    </tr>
    
    
    </table>        
     <%= end_form_tag %>  
</div>


